package cn.laowen.user.mapper;

import cn.laowen.user.domain.Logininfo;
import cn.laowen.basic.mapper.BasicMapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author laowen
 * @since 2022-06-16
 */
public interface LogininfoMapper extends BasicMapper<Logininfo> {

    /**
     * 根据username 和 type 查询Logininfo
     * @param username
     * @param type
     * @return
     */
    Logininfo loadByUserNameAndType(@Param("username") String username, @Param("type") Integer type);

    /**
     * 根据userId查询Logininfo
     * @param userId
     * @return
     */
    Logininfo loadByUserId(Long userId);
}
